
package com.insigma.business.qrcode.soldier.dao;


import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.dto.PlacementSoldierInfoBSearcher;
import com.insigma.business.qrcode.soldier.entity.PlacementSoldierInfoDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface PlacementSoldierInfoDao {

    
    List<PlacementSoldierInfoDO> search(final PlacementSoldierInfoBSearcher innerSearcher);

    
    PlacementSoldierInfoDO get(final String id);

    
    Integer insert(final PlacementSoldierInfoDO placementSoldierInfoDO);

    
    Integer update(final PlacementSoldierInfoDO placementSoldierInfoDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    @Crypt(encryptParamIndex = {1})
    PlacementSoldierInfoDO getByPlacementIdAndIdCardNo(@Param("placementId")String placementId, @Param("idCardNo")String idCardNo,  @Param("mobile")String mobile);

    PlacementSoldierInfoDO getBySoldierId(String soldierId);

    @Crypt(encryptParamIndex = {0})
    PlacementSoldierInfoDO getByIdCardNo(String idCardNo);

    List<String> listSoldierIdsOrderByRank(String placementId);

    List<PlacementSoldierInfoDO> listAllNotRecruitSoldier(String placementId);

    PlacementSoldierInfoDO getByMobile(String mobile);

    List<PlacementSoldierInfoDO> listByBatchId(String batchId);

    @Crypt(returnDecrypt = true)
    List<String> listIdCardNoOrderByRank(String placementId);

    Integer publishAllSoldier(@Param("placementId")String placementId, @Param("modifierId")String modifierId, @Param("modifierType")String modifierType);

    List<PlacementSoldierInfoDO> listByPositionId(@Param("positionId")String positionId);

    List<PlacementSoldierInfoDO> listShortInfoByPlacement(String placementId);

    int countSuccess(PlacementSoldierInfoBSearcher placementSoldierInfoBSearcher);

    List<PlacementSoldierInfoDO> listSoldierByPositionBatch(String batchId);

    PlacementSoldierInfoDO getByName(@Param("realName")String realName, @Param("placementId")String placementId);
}
